package com.zlc.workflow.core.instance.service;

import com.zlc.common.core.process.model.vo.StoneProcessLogVo;
import com.zlc.workflow.core.instance.model.BuildFlowParam;
import com.zlc.workflow.core.instance.model.NotifyWaitNodeParam;
import com.zlc.workflow.core.instance.model.QueryFlowDetailParam;
import com.zlc.workflow.core.instance.model.QueryNextTaskParam;
import com.zlc.workflow.core.instance.model.QueryRejectNodeParam;
import com.zlc.workflow.core.instance.model.RejectFlowParam;
import com.zlc.workflow.core.instance.model.RejectNodeVo;
import com.zlc.workflow.core.instance.model.SubmitFlowParam;
import com.zlc.workflow.core.instance.model.TerminationFlowParam;
import com.zlc.workflow.core.instance.model.WorkflowDetail;
import com.zlc.workflow.core.instance.model.WorkflowTaskNode;

import java.util.List;

/**
 * 流程相关
 */
public interface InstanceService {

    /**
     * 查询流程任务详情
     */
    WorkflowDetail workflowDetail(QueryFlowDetailParam param);

    /**
     * 查询流程后续任务节点
     */
    WorkflowTaskNode  nextTask(QueryNextTaskParam param);

    /**
     * 创建流程
     */
    WorkflowDetail buildFLow(BuildFlowParam param);

    /**
     * 创建并提交流程
     */
    WorkflowDetail buildAndSubmit(SubmitFlowParam param);

    /**
     * 提交流程
     */
    WorkflowDetail submit(SubmitFlowParam param);

    /**
     * 查询可退回节点信息
     */
    List<RejectNodeVo> getRejectNodeList(QueryRejectNodeParam param);

    /**
     * 退回流程
     */
    WorkflowDetail reject(RejectFlowParam param);

    /**
     * 终止流程
     */
    WorkflowDetail termination(TerminationFlowParam param);

    /**
     * 唤醒流程等待节点
     */
    WorkflowDetail notifyWaitNode(NotifyWaitNodeParam param);

    /**
     * 查询流程日志
     */
    List<StoneProcessLogVo> queryProcessLog(String processInstanceId);
}
